<?php 

include './functions.php';

$files = glob('./Upload/*');


$count = count($files);

$num = 4;

$total =ceil($count/$num);

$p = isset($_GET['p']) ? $_GET['p'] : 1;


$files = array_slice($files,($p-1)*$num,$num,true);

// var_dump($files);

include './Tpl/index.html';
 ?>